package com.appsindy.common.action;

import java.util.List;

import com.appsindy.common.bo.MenuLink;
import com.appsindy.common.service.AuthorizationServices;

public class ManageMenuAction extends AppsindyBaseAction implements IManageTab {
	
	private List<MenuLink> menuLinkList;
	private MenuLink menuLink;
	
	private AuthorizationServices authorizationServices;
	
	public String execute() {
		log.info("Init MenuLink ...");
		//setMenuLinkList(getAuthorizationServices().getMenuLinkByLevel(1));
		getSession().put(S_TAB_CODE, MNG_MENU);
		return SUCCESS;
	}
	
	public List<MenuLink> getTableData() {
		log.info("Init TableData ...");
        return getAuthorizationServices().getAllMenuLink();
    }

	public void setAuthorizationServices(AuthorizationServices authorizationServices) {
        this.authorizationServices = authorizationServices;
    }
    public AuthorizationServices getAuthorizationServices() {
        return authorizationServices;
    }
	
	public void setMenuLinkList(List<MenuLink> menuLinkList){
		this.menuLinkList = menuLinkList;
	}
	public List<MenuLink> getMenuLinkList(){
		return menuLinkList;
	}
	
	public MenuLink getMenuLink() {
		return menuLink;
	}
	public void setMenuLink(MenuLink menuLink) {
		this.menuLink = menuLink;
	}
    
}
